Generate a Binary MAC (Base24)

Command:

Generate a MAC on binary data using a TAK. If the key is single length use ANSI X9.9 MAC generation or if the key is double length use ANSI X9.19 MAC generation.

 

Field

Length & Type

Details

COMMAND MESSAGE

Message header

m A

(Subsequently returned to the Host unchanged).

Command code

2 A

Value MK.

TAK

16H or 1A+32H or 1A+48H

The TAK used to generate the MAC, encrypted under LMK 16-17.

EITHER

For Binary Communications Modes:

  

  

Data length

3 H

X’001 to X’320 indicating the length of the data field.

Data

n B

Data to be MACed. 1 to 800 bytes.

OR

For Normal Async Modes:

  

  

Data length

3 H

X’002 to X’320 indicating the length of the data field.

Data

n H

Data to be MACed. 2 to 800 hexadecimal characters representing 1 to 400 bytes.

End message delimiter

1 C

Optional. Must be present if a message trailer is present. Value X’19.

Message trailer

n A

Optional. Maximum length 32 characters.


 

Field

Length & Type

Details

RESPONSE MESSAGE

Message header

m A

Returned to the Host unchanged.

Response code

2 A

Value ML.

Error code

2 N

00 : No errors

10 : TAK parity error

12 : No keys in user storage

13 : LMK parity error

15 : Error in input data

80 : Data length error

27 : TAK not single length

MAC

8 H

The computed MAC.

End message delimiter

1 C

Present only if present in the command message. Value X’19.

Message trailer

n A

Present only if present in the command message. Maximum length 32 characters.